package com.zhouchao.springboot.core;

import com.zhouchao.springboot.server.ServletWebServerFactory;
import com.zhouchao.springboot.server.TomcatWebServerFactory;
import com.zhouchao.springboot.server.WebServer;

/**
 * @Author: zhouchao
 * @Date: 2021/06/09 00:53
 * @Description:
 */
public class SpringApplication {

    public static void run() {
        ServletWebServerFactory servletWebServerFactory = new TomcatWebServerFactory();
        WebServer webServer = servletWebServerFactory.getWebServer();
        try {
            webServer.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
